import request from '@/utils/request'

// 查询打印字段列表
export function listFields(query) {
  return request({
    url: '/manage/fields/list',
    method: 'get',
    params: query
  })
}

// 查询打印字段详细
export function getFields(id) {
  return request({
    url: '/manage/fields/' + id,
    method: 'get'
  })
}

// 新增打印字段
export function addFields(data) {
  return request({
    url: '/manage/fields',
    method: 'post',
    data: data
  })
}

// 修改打印字段
export function updateFields(data) {
  return request({
    url: '/manage/fields',
    method: 'put',
    data: data
  })
}

// 删除打印字段
export function delFields(id) {
  return request({
    url: '/manage/fields/' + id,
    method: 'delete'
  })
}

export function getFieldList() {
  return request({
    url: '/manage/fields/fieldList',
    method: 'get'
  })
}

export function getTemplateList() {
  return request({
    url: '/manage/fields/templateList',
    method: 'get'
  })
}
